<!-- Copyright 2020 The Chromium Authors. All rights reserved.
   Use of this source code is governed by a BSD-style license that can be
   found in the LICENSE file.-->
<!doctype html>
<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
  <link rel="stylesheet" href="chrome://resources/css/roboto.css">

  <link rel="stylesheet" href="conversion_internals.css">
  <script type="module" src="conversion_internals.js"></script>
  <title>Conversion Internals</title>
</head>
<body>

<div id="page-heading">
  Conversion Internals
</div>
<div id="page-content">
  <h2> General Info </h2>
  <div class="content">
    <div>
      Conversion measurement is currently <span id="feature-status-content"></span>.
      For a detailed explanation of the API and it's behavior, see
      <a href="https://github.com/WICG/conversion-measurement-api/blob/master/README.md" target="_blank">
        the explainer
      </a>.
    </div>
    <div>
      <button id="refresh">Refresh all page data</button>
      <button id="clear-data">Clear all conversions data</button>
    </div>
  </div>
  <h2> Active Impressions </h2>
  <div class="content">
    <div class="table-wrapper">
      <table id="impression-table">
        <thead>
          <tr class="header-row">
            <th>
            Impression Data
            </th>
            <th>
              Impression origin
            </th>
            <th>
              Conversion Destination
            </th>
            <th>
              Reporting Origin
            </th>
            <th>
              Impression Time
            </th>
            <th>
              Expiry Time
            </th>
          </tr>
        </thead>
        <tbody id="impression-table-body">
        </tbody>
      </table>
    </div>
  </div>
  <h2> Pending Reports </h2>
  <div class="content">
    <div class="table-wrapper">
      <table id="report-table">
        <thead>
          <tr class="header-row">
            <th>
              Impression Data
            </th>
            <th>
              Conversion Data
            </th>
            <th>
              Conversion Origin
            </th>
            <th>
              Reporting Origin
            </th>
            <th>
              Report Time
            </th>
            <th>
              Attribution Credit
            </th>
          </tr>
        </thead>
        <tbody id="report-table-body">
        </tbody>
      </table>
    </div>
    <div>
      <button id="send-reports">Send All Reports</button>
    </div>
  </div>
</div>

<template id="impressionrow">
  <tr>
    <td class="impression-data-cell"></td>
    <td class="impression-origin-cell"></td>
    <td class="conversion-destination-cell"></td>
    <td class="reporting-origin-cell"></td>
    <td class="impression-time-cell"></td>
    <td class="expiry-time-cell"></td>
  </tr>
</template>

<template id="reportrow">
  <tr>
    <td class="impression-data-cell"></td>
    <td class="conversion-data-cell"></td>
    <td class="conversion-origin-cell"></td>
    <td class="reporting-origin-cell"></td>
    <td class="report-time-cell"></td>
    <td class="attibution-credit-cell"></td>
  </tr>
</template>
</body>
</html>
